<?php defined('InShopNC') or exit('Access Invalid!');  ?>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>我的积分</title>
    <link href="http://www.zhaojinyin.cn/member/templates/default/css/member.css" rel="stylesheet" type="text/css">
    <link href="http://www.zhaojinyin.cn/mobile/resource/css/zhaojinyin_index.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="<?php echo MOBILE_RESOURCE_SITE_URL; ?>/css/mui.min.css">
    <!--App自定义的css-->
    <link rel="stylesheet" type="text/css" href="<?php echo MOBILE_RESOURCE_SITE_URL; ?>/css/app.css" />
    <!--App自定义的css-->
    <link rel="stylesheet" type="text/css" href="<?php echo MOBILE_RESOURCE_SITE_URL; ?>/css/zhaojinyin_index.css" />
    <link href="<?php echo MOBILE_RESOURCE_SITE_URL; ?>/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <style>

        .alert {
            color: #C09853;
            background-color: #FCF8E3;
            padding: 9px 14px;
            margin: 0px auto;
            border: 1px solid #FBEED5;
            text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
        }
        table,table p{font-size: 12px; color:#999; font-weight: normal;}

        .mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active {
            color: #BB9E77;
            border-bottom: 2px solid #BB9E77;
            background: 0 0;
        }

        
    </style>
    <script src="http://www.zhaojinyin.cn/mobile/resource/js/mui.min.js"></script>
</head>

<body style="padding-bottom: 150px;">
<header class="mui-bar mui-bar-nav">
    <a class="mui-icon mui-icon-left-nav"  href="/mobile/index.php?act=member_index&op=member_index"></a>
    <h1 class="mui-title">我的积分</h1>
</header>
<div class="mui-content">
    <div style="padding: 5px 0px 0px;">
        <div id="segmentedControl" class="mui-segmented-control mui-segmented-control-inverted">
            <a class="mui-control-item mui-active" href="#item1">积分明细</a>
            <a class="mui-control-item" href="#item2">积分兑换</a>
            <a class="mui-control-item" href="#item3">积分获得规则</a>
        </div>
    </div>
    <div>




        <div id="item1" class="mui-control-content mui-active">
            <table class="ncm-default-table">
                <thead>
                <tr>
                    <th class="w200">添加时间</th>
                    <th class="w150">积分变更</th>
                    <th class="w300">操作</th>
                    <th class="tl">描述</th>
                </tr>
                </thead>
                <tbody>
                <?php  if (count($output['list_log'])>0) { ?>
                <?php foreach($output['list_log'] as $val) { ?>
                <tr class="bd-line">
                    <td class="goods-time"><?php echo @date('Y-m-d',$val['pl_addtime']);?></td>
                    <td class="goods-price"><?php echo ($val['pl_points'] > 0 ? '+' : '').$val['pl_points']; ?></td>
                    <td><?php
                        switch ($val['pl_stage']){
                            case 'regist':
                                echo "注册";
                                break;
                            case 'login':
                                echo "登录";
                                break;
                            case 'comments':
                                echo "评论";
                                break;
                            case 'order':
                                echo "消费";
                                break;
                            case 'system':
                                echo "积分管理";
                                break;
                            case 'pointorder':
                                echo "礼品兑换";
                                break;
                            case 'app':
                                echo "积分兑换";
                                break;
                        }
                        ?></td>
                    <td class="tl"><?php echo $val['pl_desc'];?></td>
                </tr>
                    <?php } ?>
                <?php }  ?>
                </tbody>
            </table>
            <div class="mui-content-padded" style="text-align:center;">
                <div class="pagination"><?php echo $output['show_page']; ?></div>
            </div>
        </div>


        <div id="item2" style="display: none" class="mui-control-content">
            <table class="ncm-default-table order">
                <thead>
                <tr>
                    <th style="width:33%;">礼品信息</th>
                    <th>积分/数量</th>
                    <th>交易状态/操作</th>
                </tr>
                </thead>
                <tbody>
                <?php if(count($output['order_list'])>0){ ?>
                    <?php foreach ($output['order_list'] as $val) { ?>
                        <tr>
                            <th>兑换单号：</th>
                            <th>
                                <p>积分:0000</p>
                                <p>数量:0000</p>
                                <p>积分合计:0000000</p>
                            </th>
                            <th>
                                <p>交易状态</p>
                                <p>
                                    <a href="">操作</a>
                                    /
                                    <a href="">操作</a>
                                    /
                                    <a href="">操作</a>
                                </p>

                            </th>
                        </tr>
                    <?php } ?>
                <?php } ?>

                <!--
                <tr>
                <td colspan="20" class="norecord">
                    <div class="warning-option"> <i>&nbsp;</i>
                        <span>暂无符合条件的数据记录</span>
                    </div>
                </td>
            </tr>
            -->
                </tbody>
                <tfoot></tfoot>
            </table>
            <div class="mui-content-padded" style="text-align:center;">
                <div class="pagination"><?php echo $output['show_page']; ?></div>
            </div>
        </div>


        <div id="item3" class="mui-control-content">
            <div class="alert alert-block">
                <h4>积分获得规则</h4>
                <ul>
                    <li>
                        成功注册会员：增加<em><?php echo C('points_reg');?></em>
                        积分；会员每天登录：增加<em><?php echo C('points_login');?></em>
                        积分；评价完成订单：增加
                        <em><?php echo C('points_comments');?></em>
                        积分。
                    </li>
                    <li>购物并付款成功后将获得订单总价5%（最高限额不超过800）积分。</li>
                    <li>如订单发生退款、退货等问题时，积分将不予退还。</li>
                </ul>
            </div>
        </div>

    </div>

</div>
<script>
    mui.init({
        swipeBack:true //启用右滑关闭功能
    });
    (function($) {
        $('#scroll').scroll({
            indicators: true //是否显示滚动条
        });
    })(mui);
</script>
</body>

</html>